<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="slide of list" :key="slide.id"><img width="100%" height="120" :src="slide.imgUrl" /></swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
  name: 'carrousel',
  props:{
    list:{
      type: Array
    }
  },
  data() {
    return {
      swiperOption: {
        autoplay: 3500,
        setWrapperSize :true,
        pagination : '.swiper-pagination',
        paginationClickable :true,
        mousewheelControl : true,
        observeParents:true,
        loop:true,
        speed:2000
      }
    }
  }
}
</script>

<style lang="stylus" rel="stylesheet/stylus">
.wrapper
  overflow hidden
  width 100%
  height 0
  padding-bottom 31.25%
  background #EAEAEA
  touch-action none
  .swiper-pagination-bullet-active
    background #fff
  .swiper-pagination-bullet
    width 6px
    height 6px
</style>
